-- Tunnel from Glade to Tower 

function autoexec()
   


return
refresh()
end


function postexec()
  
return
end


function zone_handler(zn)
  if (zn == 0) then
    combat(9)

  elseif (zn == 1) then
    change_map("glade","tunnel_exit");

  elseif (zn == 2) then
    warp("2dn",8)

  elseif (zn == 3) then
    warp("3up",8)
 
  elseif (zn == 4) then
    warp("4up",8)
 
  elseif (zn == 5) then
    warp("5dn",8)

  elseif (zn == 6) then
    warp("6dn",8)

  elseif (zn == 7) then
    warp("7up",8)

  elseif (zn == 8) then
    warp("8up",8)

  elseif (zn == 9) then
    warp("9dn",8)

  elseif (zn == 10) then
    warp("10dn",8)

 elseif (zn == 11) then
    warp("11up",8)

 elseif (zn == 12) then
    warp("12up",8)

 elseif (zn == 13) then
    warp("13dn",8)

 elseif (zn == 14) then
 --change_map("towerx","tunnel2_exit");
   bubble(255,"You have succesfully entered the territory of Akanthos.");
   bubble(255,"Thanks for playing the KQ the Betrayer Demo. This is as far as you can go. ");
   bubble(255,"Questions, comments, bugs: Visit www.virtualkingdoms.net");

 elseif (zn == 15) then
    set_save(1)

 elseif (zn == 16) then
    set_save(0)

 elseif (zn == 17) then
   bubble(HERO1,"All right lets see if this key works.");
   set_progress(P_QUEST1, 10);
   refresh();
   sfx(25);   
   

        end

function entity_handler(en)
  
  end

     end


function refresh()
  if (get_progress(P_QUEST1) > 9) then
    set_obs("tower_door",0)
    set_zone("tower_door", 254)
    set_btile("tower_door", 96)
  end

  return
end


